What will the above program write out?
Important date on: Saturday
Remember that when a LET
statement executes,
it goes through several steps:
LET statements used with subscripted variable are no exception. However, a bit of extra work is done to deal with the subscript:
LET WHICH = 6 +------- Step 1. Memory is found for the variable HOTDATE$ | | LET HOTDATE$ = DAY$( WHICH ) | | | | | +----- Step 2. A value is found for the expression on the RIGHT. | This now involves getting the value in WHICH, | then getting the value in DAY$(6), | the string "Saturday" | +------ Step 3. The value is copied into the variable HOTDATE$
This is easy enough with the above statement, but things can get much more complicated.
Do things have to get more complicated?